package com.xiaodu.springboot.mybatis.plus;

import com.baomidou.mybatisplus.core.toolkit.AES;

/**
 * @author: dutianjie
 * @date: 2021/5/22
 * @version: v1.0.0
 * @description: 描述
 **/
public class EncryptUtil {

    public static void main(String[] args) {
        String s = AES.generateRandomKey();
        String username = "root";
        String password = "123456";
        String url = "jdbc:p6spy:mysql://localhost:3306/mytest?useSSL=false&charsetEncoding=utf8";
        System.out.println("key =" + s);
        System.out.println(AES.encrypt(username, s));
        System.out.println(AES.encrypt(password, s));
        System.out.println(AES.encrypt(url, s));


    }
}
